<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
</head>
<body>
<form method="post">
	Username: <input type="text" name="username" /><br />
	Password: <input type="password" name="password" /><br />
	Status: <input type="textarea" style="height: 50px; width: 300px;" name="status"><br />
	<input type="submit" value="submit">
</form>
<div class="result"><pre>
<?php

require_once('./twitter.php');   

//$twitter = new Arc90_Service_Twitter('cloudwater', '3ogwyy');   
//$twitter = new Arc90_Service_Twitter('duguran', 'iverson');
$twitter = new Arc90_Service_Twitter($_REQUEST['username'], $_REQUEST['password']);

try   
{
	if (isset($_REQUEST['status']))
	{
		// Gets the authenticated user's friends timeline in XML format   
		$response = $twitter->updateStatus($_REQUEST['status'], 'xml');

		// Print the XML response   
		//echo $response->getData() . "\n";   

		// If Twitter returned an error (401, 503, etc), print status code   
		if($response->isError())   
		{   
			echo $response->http_code . "\n";   
		}
		else
		{
			echo 'status update OK.';
		}
	}
}   
catch(Arc90_Service_Twitter_Exception $e)   
{   
    // Print the exception message (invalid parameter, etc)   
    print $e->getMessage();   
} ?>
</pre><div>
</body></html>